package com.sweet.moshi.strategyfactory;

import com.sweet.moshi.strategy.Strategy;
import com.sweet.moshi.strategy.Strategy1;
import com.sweet.moshi.strategy.Strategy2;

import java.util.HashMap;
import java.util.Map;

public class StrategyFactory {
    private static final Map<Integer, Strategy> styMap = new HashMap<>();
    static {
        styMap.put(1, new Strategy1());
        styMap.put(2, new Strategy2());
    }
    public static Strategy getStrategy(int type) {
        return styMap.get(type);
    }
}
